const state={registrationForm:{valid:null,errors:[]}},emailInput=document.querySelector(".emailInput"),passwordInput=document.querySelector(".passwordInput"),submit=document.querySelector(".form_auth_button");emailInput.addEventListener("keyup",(t=>{const r=t.target.value;state.registrationForm.value=r,r.match(/^\d+$/)?(state.registrationForm.valid=!0,state.registrationForm.errors=[]):(state.registrationForm.valid=!1,state.registrationForm.errors.push("wrong format")),submit.disabled=!state.registrationForm.valid,state.registrationForm.valid?emailInput.style.border=null:emailInput.style.border="thick solid red"}));